package com.google.code.p.restrpc.http;

import java.io.IOException;
import java.io.InputStream;


/**
 * @author dz
 */
public interface HttpClientResponse {
     
    /**
     * 
     * @return
     */
    public HttpHeaders getHeaders();
    
    /**
     * 
     * @return
     * @throws IOException
     */
    public HttpStatus getStatusCode() throws IOException;
    
    /**
     * 
     * @return
     * @throws IOException
     */
    public int getStatusCodeValue() throws IOException;
    
    /**
     * 
     * @return
     * @throws IOException
     */
    public String getStatusText() throws IOException;
    
    /**
     * 
     * @return
     * @throws IOException
     */
    public InputStream getBody() throws IOException;
    
    /**
     * 
     * @return
     * @throws IOException
     */
    public byte[] getBodyAsByteArray() throws IOException;
    
    /**
     * 
     * @return
     * @throws IOException
     */
    public String getBodyAsString() throws IOException;
    
    /**
     * No exception(include runtime exception) and error throw out
     */
    public void close();
    
}
